<%@ Page Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs"
    Inherits="SLIITPro.Register" Title="Register New User" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
    <table style="width: 50%" id="regTable" runat="server" class="gridtable">
        <tr>
            <td>
                <fieldset>
                    <legend>Basic Informations</legend>
                    <table class="gridtable" width="100%">
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                <asp:TextBox ID="txtFirstName" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfFirstname" runat="server" ControlToValidate="txtFirstName"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="user"><img src="Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Last Name
                            </td>
                            <td>
                                <asp:TextBox ID="txtLastName" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Street
                            </td>
                            <td>
                                <asp:TextBox ID="txtStreet" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfStreet" runat="server" ControlToValidate="txtStreet"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="user"><img src="Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                City
                            </td>
                            <td>
                                <asp:TextBox ID="txtCity" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Province
                            </td>
                            <td>
                                <asp:TextBox ID="txtProvince" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Country
                            </td>
                            <td>
                                <asp:DropDownList ID="cmbCountry" runat="server" CssClass="droplist" Width="175px" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Phone
                            </td>
                            <td>
                                <asp:TextBox ID="txtPhone" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfPhone" runat="server" ControlToValidate="txtPhone"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="user"><img src="Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regPhone" runat="server" ControlToValidate="txtPhone"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a phone number in the format:&lt;br /&gt;+94xxxxxxxxx"
                                    ValidationExpression="^[+][0-9]\d{2}[0-9]\d{7}" ValidationGroup="user"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Fax
                            </td>
                            <td>
                                <asp:TextBox ID="txtFax" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="regPhone0" runat="server" ControlToValidate="txtFax"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a phone number in the format:&lt;br /&gt;+94xxxxxxxxx"
                                    ValidationExpression="^[+][0-9]\d{2}[0-9]\d{7}"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td>
                <fieldset>
                    <legend>Login Information</legend>
                    <table class="gridtable" width="100%">
                        <tr>
                            <td>
                                Email
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmail" CssClass="droplist" runat="server" Width="175px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfEmail" runat="server" ControlToValidate="txtEmail"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="user"><img src="Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regEmail" runat="server" ControlToValidate="txtEmail"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a Email address in the format:&lt;br /&gt;name@yourdomian.com"
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="user"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                User Type
                            </td>
                            <td>
                                <asp:DropDownList ID="cmbUserType" runat="server" CssClass="droplist" Width="175px" >
                                    <asp:ListItem Text="information" Value="information" />
                                    <asp:ListItem Text="busines" Value="business" />
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Password
                            </td>
                            <td>
                                <asp:TextBox ID="txtPassword" CssClass="droplist" runat="server" Width="175px" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfPassword" runat="server" ControlToValidate="txtPassword"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="user"><img src="Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Re-Password
                            </td>
                            <td>
                                <asp:TextBox ID="txtRePassword" CssClass="droplist" runat="server" Width="175px"
                                    TextMode="Password"></asp:TextBox>
                                <asp:CompareValidator ID="cmpPassword" runat="server" ControlToCompare="txtRePassword"
                                    ControlToValidate="txtPassword" Display="Dynamic" ErrorMessage="Password not matched"
                                    ValidationGroup="user"></asp:CompareValidator>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblMessage" runat="server" Style="font-weight: 700"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <div class="buttondiv">
                    <asp:Button ID="btnRegister" runat="server" Text="Register" CssClass="cssbutton"
                        ValidationGroup="user" Width="75px" OnClick="btnRegister_Click" />
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
